package com.tom.architect02.mnbase.jetpack.databinding;

import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
//import androidx.databinding.library.baseAdapters.BR;

import android.os.Bundle;

import com.tom.architect02.R;
import com.tom.architect02.databinding.ActivityDatabindBinding;

public class DatabindActivity extends AppCompatActivity {
    ActivityDatabindBinding binding;
    User user;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
//        setContentView(R.layout.activity_databind);
        binding = DataBindingUtil.setContentView(this, R.layout.activity_databind);
        user = new User("tom", "232323");
        binding.setUser(user);
        // binding.setVariable(BR.name, "Lucy");
        user.setName("asdf");

    }
}